import request from "../utils/http/request";
import qs from 'qs'
//上传视频
export function uploadFile(data: any) {
    return request({
        url: "/lesson/insert",
        method: "post",
        data,
        transformRequest: [function (data, headers) {
            delete headers['Content-Type']
            console.log(data)
            return data;
        }],
    })
}
//查询讲师详情
export function searchTeacher(data: any) {
    return request({
        url: `/teacher/detail?name=${data.name}&phone=${data.phone}`,
        method: "post",
    })
}

//上传讲义
export function uploadFdf(data: any) {
    return request({
        url: "/lesson/uploadFile",
        method: "post",
        data,
    })
}

//修改课时
export function sumbitLesson(data: any) {
    return request({
        url: `/lesson/update`,
        method: "post",
        data:qs.stringify(data)
    })
}